<template>
  <div class="box">
    {{a}}
    <input type="button" value="+1" @click="$refs.child.add()">
    <child ref='child'/>
  </div>
</template>

<script>
import Child from './child'
export default {
  data() {
    return {
      a: 12
    };
  },
  created() {},
  methods: {},
  components: {Child}
};
</script>

<style scoped>
.box {
  height: 200px;
  width: 200px;
  background: #ccc;
}
</style>
